let mongoose = require('mongoose'),
    Schema = mongoose.Schema;
 
let CategorySchema = new Schema({
    title:{type:String,required:true},
    content:{type:String,required:true},
    slug:{type:String,required:true},
    category:{type: Schema.Types.ObjectId,ref:true},
    author:{type: Schema.Types.ObjectId,ref:true},
    publised:{type:Boolean, default:false},
    meta:{type:Schema.Types.Mixed,required:true},
    comments:[Schema.Types.Mixed],
    created:{type:Date}
})

mongoose.model('Category',CategorySchema)   